package com.neuedu.javase;

/**
 * @auth 金山老师
 * title:   书籍代码
 * creatime: 2022-09-21 16:33
 *
 * 描述 : 赋值运算
 */
public class Operator1 {
    public static void main(String[] args) {

        /**
         * 变量在使用之前 需要初始化
         */
        int num  = 0;

        num = 100; //赋值操作


        num += 10;  // num = num +10;
        System.out.println("num += 10:   "+(num )); // 110

        num -= 4;  // num = num - 4;
        System.out.println("num -= 4:   "+(num )); //106

        num /= 2;  // num = num / 2;
        System.out.println("num /= 2:   "+(num )); // 53

        num *= 10;  // num = num  * 10;
        System.out.println("num *= 10:   "+(num )); //530


        num %= 50;  // num = num  % 50;
        System.out.println("num %= 10:   "+(num )); // 30

    }
}
